* used within-process
*/
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, /* bytes */
(void*)&buffer,
sizeof (buffer));
gsize len;
str = gtk_text_buffer_serialize (buffer, buffer,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
&start, &end, &len);
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, /* bytes */
str, len);
g_free (str);
* be used within-process. OK to supply a NULL value for contents.
*/
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, /* bytes */
(void*)&contents,
sizeof (contents));
gtk_text_buffer_get_bounds (contents, &start, &end);
str = gtk_text_buffer_serialize (clipboard_source_buffer, contents,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
&start, &end, &len);
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, /* bytes */
str, len);
g_free (str);
GtkTextBuffer *src_buffer = NULL;
/* If we can get the owner, the selection is in-process */
- owner = gdk_selection_owner_get_for_display (selection_data->display,
- selection_data->selection);
+ owner = gdk_selection_owner_get_for_display (gtk_selection_data_get_display (selection_data),
+ gtk_selection_data_get_selection (selection_data));
if (owner == NULL)
return NULL;
if (gdk_window_get_window_type (owner) == GDK_WINDOW_FOREIGN)
return NULL;
-
- if (selection_data->type !=
- gdk_atom_intern_static_string ("GTK_TEXT_BUFFER_CONTENTS"))
+
+ if (gtk_selection_data_get_data_type (selection_data) != gdk_atom_intern_static_string ("GTK_TEXT_BUFFER_CONTENTS"))
return NULL;
- if (selection_data->length != sizeof (src_buffer))
+ if (gtk_selection_data_get_length (selection_data) != sizeof (src_buffer))
return NULL;
-
- memcpy (&src_buffer, selection_data->data, sizeof (src_buffer));
+
+ memcpy (&src_buffer, gtk_selection_data_get_data (selection_data), sizeof (src_buffer));
if (src_buffer == NULL)
return NULL;